#include "TexturePair.hpp"

TexturePair::TexturePair(Texture* textureIn, int width, int height)
{
	From = textureIn;
	To = new Texture(width, height);
	
}
void TexturePair::RenderPass(const Shader& shader, int iterations)
{
	shader.Use();
	
	for(int i = 0; i < iterations; i ++)
	{
		From -> RenderToTexture(shader, *To);
		Texture* temp = From;
		From = To;
		To = temp;
	}
	
	Shader::UseNoShader();
}
Texture& TexturePair::GetTexture()
{
	return *From;
}

void TexturePair::SetTexture(Texture* textureIn)
{
	From = textureIn;
}

/*
void TexturePair::RenderPass(const Shader* shaders, int numberOfShaders, int iterations)
{
	
}
*/
